package com.qys.livesMall.shop.service;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qys.livesMall.common.result.R;
import com.qys.livesMall.shop.modal.dto.ShopProductAnchorOrderInfoDto;
import com.qys.livesMall.shop.modal.entity.ShopOrderSku;
import com.qys.livesMall.shop.modal.vo.OrderFansRepurchaseVO;
import com.qys.livesMall.shop.modal.vo.ShopOrderSkuVO;
import com.qys.livesMall.shop.modal.vo.OrderAnchorListVO;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author gmx
 * @since 2023-06-19
 */
public interface ShopOrderSkuService extends IService<ShopOrderSku> {
    Long querySku(Long shopId);

    /**
     * 获取未结算订单
     * @param shopId
     * @param endTime
     */
    List<ShopOrderSku> getNoSettlementOrder(Long shopId, Date endTime);

    /**
     * 获取昨天的订单数据
     * @param yesterday
     * @return
     */
    List<OrderAnchorListVO> getOrderAnchorList(DateTime yesterday);

    Page<ShopOrderSkuVO> listProductAnchorOrder(ShopProductAnchorOrderInfoDto shopProductAnchorDto);

    ShopOrderSkuVO getProductAnchorInfo(String skuId);

    /**
     * 粉丝复购率
     * @return
     */
    List<OrderFansRepurchaseVO> getFansRepurchase();

    List<ShopOrderSku> getByOrderId(Long orderId);

    List<ShopOrderSku> getPriceByOrderId(Long orderId);

    List<ShopOrderSku> getByNoPayCost(LocalDateTime date);
    List<ShopOrderSku> getStatusByOrderId(Long orderId);


    Map<String,String> getByOrderNo(String orderNo);
    List<ShopOrderSku> getByOrderIdAndShop(Long shopId,Long orderId);

    R payCost(List<Long> orderIds);

    List<ShopOrderSku> getReceivedOutTimeOrder(long startTime,long endTime);
    Integer getOrderNum(Long shopId,LocalDateTime startTime, LocalDateTime endTime);


}
